package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the DOCUMENT_DATA database table.
 * 
 */
@Entity
@Table(name="DOCUMENT_DATA")
@NamedQuery(name="DocumentData.findAll", query="SELECT d FROM DocumentData d")
public class DocumentData implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="DOCUMENT_DATA_DATAID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="DOCUMENT_DATA_DATAID_GENERATOR")
	@Column(name="DATA_ID")
	private long dataId;

	@Column(name="DATA_CLOSE")
	private BigDecimal dataClose;

	@Column(name="DATA_PERSON")
	private String dataPerson;

	@Column(name="DATA_REMARK")
	private String dataRemark;

	@Column(name="DATA_UPDATEDATE")
	private Timestamp dataUpdatedate;

	//bi-directional many-to-one association to DocumentMaster
	@OneToMany(mappedBy="documentData")
	@JSONField(serialize=false)
	private List<DocumentMaster> documentMasters;

	public DocumentData() {
	}

	public long getDataId() {
		return this.dataId;
	}

	public void setDataId(long dataId) {
		this.dataId = dataId;
	}

	public BigDecimal getDataClose() {
		return this.dataClose;
	}

	public void setDataClose(BigDecimal dataClose) {
		this.dataClose = dataClose;
	}

	public String getDataPerson() {
		return this.dataPerson;
	}

	public void setDataPerson(String dataPerson) {
		this.dataPerson = dataPerson;
	}

	public String getDataRemark() {
		return this.dataRemark;
	}

	public void setDataRemark(String dataRemark) {
		this.dataRemark = dataRemark;
	}

	public Timestamp getDataUpdatedate() {
		return this.dataUpdatedate;
	}

	public void setDataUpdatedate(Timestamp dataUpdatedate) {
		this.dataUpdatedate = dataUpdatedate;
	}

	public List<DocumentMaster> getDocumentMasters() {
		return this.documentMasters;
	}

	public void setDocumentMasters(List<DocumentMaster> documentMasters) {
		this.documentMasters = documentMasters;
	}

	public DocumentMaster addDocumentMaster(DocumentMaster documentMaster) {
		getDocumentMasters().add(documentMaster);
		documentMaster.setDocumentData(this);

		return documentMaster;
	}

	public DocumentMaster removeDocumentMaster(DocumentMaster documentMaster) {
		getDocumentMasters().remove(documentMaster);
		documentMaster.setDocumentData(null);

		return documentMaster;
	}

}